//
//  TQYFMDBManager.h
//  TQY
//
//  Created by 甘世清 on 2024/10/31.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface TQYFMDBManager : NSObject
//创建聊天列表
+(void)SQ_creattable;
 
//聊天列表读取
+(NSArray*)SQ_IMAcquire;

/// 添加会话列表
/// - Parameter model: 模型
+(BOOL)SQ_addListModel:(IMListModel*)model;

/// 设置指定房间未读数为0
/// - Parameter roomID: 房间
+(BOOL)SQ_updateModel:(NSString*)roomID;

/// 根据查询的房间id返回一个房间模型
/// - Parameter roomID: 房间id
+(IMListModel*)SQ_roomIDGetIMListModel:(NSString*)roomID;

/// 根据房间id删除整个数据
/// - Parameter roomID: 房间id
+(BOOL)SQ_deletet:(NSString*)roomID;


/// 获取未读数多少
+(NSString*)SQ_getMessageCount;

/// 存储消息列表接口
/// - Parameter model: 消息模型
+(BOOL)SQ_addListIMMessage:(IMMessageModel*)model;


/// 读取
/// - Parameters:
///   - roomId: 房间id
///   - size: size
///   - page: page
+(NSArray*)SQ_UserAcquireID:(NSString*)roomId size:(NSInteger)size page:(NSInteger)page;

/// 根据消息id来判断是否该消息已存储
/// - Parameter model: 模型
+(BOOL)SQ_messageModel:(NSString*)messageId roomId:(NSString*)roomId;

/// 根据消息id删除单个数据
/// - Parameter roomID: 房间id
+(BOOL)SQ_deletetMessage:(IMMessageModel*)model;

/// 根据消息pid删除单个数据
/// - Parameter roomID: 房间id
+(BOOL)SQ_deletetMessagePid:(IMMessageModel*)model;

//表名字
+(NSString*)SQ_getFriendListName;
//当前pid
+(NSString*)SQ_getpid;
//最小id存储key
+(NSString*)SQ_getminIDName;
@end

NS_ASSUME_NONNULL_END
